PAGE 1

9.3 Fourier Cosine and Sine Series

last time: \( f(t) \) period \( 2L \)

\[ f(t) \sim \frac{1}{2} a_0 + \sum_{n=1}^{\infty} \left[ a_n \cos\left(\frac{n\pi t}{L}\right) + b_n \sin\left(\frac{n\pi t}{L}\right) \right] \]
\[ a_n = \frac{1}{L} \int_{0}^{2L} f(t) \cos\left(\frac{n\pi t}{L}\right) dt \]
\[ b_n = \frac{1}{L} \int_{0}^{2L} f(t) \sin\left(\frac{n\pi t}{L}\right) dt \]
or any interval \( 2L \) in length

many examples we've seen have purely cosine or sine terms

why?

a function \( f(t) \) is even if \( f(-t) = f(t) \)

for example, \( t^2, t^4, t^6, \cos(t) \)

\( \rightarrow \) have vertical axis symmetry

PAGE 2

Even and Odd Functions

A graph of the even function f(t) = t squared. It shows a parabola symmetric about the vertical f(t) axis. Two points are marked: (t sub 0, t sub 0 squared) on the right and (-t sub 0, t sub 0 squared) on the left, demonstrating y-axis symmetry.
Graph of \( f(t) = t^2 \) showing y-axis symmetry.
A graph of the even function f(t) = cos(t). The curve is symmetric about the vertical f(t) axis, with a peak at the origin and crossing the t-axis at plus and minus pi over 2.
Graph of \( f(t) = \cos(t) \) showing y-axis symmetry.

A function \( f(t) \) is odd if \( f(-t) = -f(t) \)

For example, \( t, t^3, t^5, \sin(t) \)

→

they have origin symmetry

A graph of the odd function f(t) = t cubed. The curve passes through the origin and is symmetric with respect to the origin. Points (t sub 0, t sub 0 cubed) and (-t sub 0, -t sub 0 cubed) are marked, connected by a dashed line passing through the origin.
Graph of \( f(t) = t^3 \) showing origin symmetry.
A graph of the odd function f(t) = sin(t). The wave passes through the origin, with a peak in the first quadrant and a corresponding trough in the third quadrant, demonstrating rotational symmetry about the origin.
Graph of \( f(t) = \sin(t) \) showing origin symmetry.
PAGE 3

Properties of Even and Odd Functions in Fourier Series

  • Product of two even functions is even
  • Product of two odd functions is even
  • Product of one even and one odd functions is odd

Application to Fourier Coefficients

Back to the definition of \( a_n \):

\[ a_n = \frac{1}{L} \int_{-L}^{L} f(t) \cos\left( \frac{n \pi t}{L} \right) dt \]
Note: The term \( \cos\left( \frac{n \pi t}{L} \right) \) is an even function.

If \( f(t) \) is even, then \( f(t) \cos\left( \frac{n \pi t}{L} \right) \) is even.

So, \( f(t) \cos\left( \frac{n \pi t}{L} \right) \) has vertical axis symmetry.

A Cartesian coordinate graph with horizontal axis  t  and vertical axis  f(t) . It depicts a symmetric curve labeled  f(t) \cos\left(\frac{n \pi t}{L}\right)  between  -L  and  L . The area under the curve is shaded, visually demonstrating that the integral from  -L  to  L  is twice the integral from  0  to  L  because the function is even.

Clearly,

\[ a_n = \frac{1}{L} \int_{-L}^{L} f(t) \cos\left( \frac{n \pi t}{L} \right) dt \]\[ = \frac{2}{L} \int_{0}^{L} f(t) \cos\left( \frac{n \pi t}{L} \right) dt \]
PAGE 4

\( f(t) \) is even, \( f(t) \sin\left(\frac{n\pi t}{L}\right) \) is odd

So, \( f(t) \sin\left(\frac{n\pi t}{L}\right) \) has origin symmetry

A graph of an odd function  f(t) \sin\left(\frac{n\pi t}{L}\right)  on the interval [-L, L]. The graph shows origin symmetry where the area between the curve and the t-axis from -L to 0 is equal and opposite to the area from 0 to L, resulting in a net area of zero.

clearly,

\[ b_n = \frac{1}{L} \int_{-L}^{L} f(t) \sin\left(\frac{n\pi t}{L}\right) dt \] \[ = 0 \quad (\text{net area} = 0) \]

Fourier Cosine Series

if \( f(t) \) is even w/ period \( 2L \), then

\[ a_n = \frac{2}{L} \int_{0}^{L} f(t) \cos\left(\frac{n\pi t}{L}\right) dt \]

\( b_n = 0 \) for all \( n \)

\[ f(t) \sim \frac{1}{2} a_0 + \sum_{n=1}^{\infty} a_n \cos\left(\frac{n\pi t}{L}\right) \]
PAGE 5

repeating w/ an odd \( f(t) \), we see

if \( f(t) \) is odd w/ period \( 2L \), then

\( a_n = 0 \) for all \( n \)

\[ b_n = \frac{2}{L} \int_{0}^{L} f(t) \sin\left(\frac{n\pi t}{L}\right) dt \]

\[ f(t) \sim \sum_{n=1}^{\infty} b_n \sin\left(\frac{n\pi t}{L}\right) \]

Fourier sine series

we can now describe \( f(t) \) in a more compact way by giving \( f(t) \) on half a period and specify whether an even extension or an odd extension is added to complete the full period

→ tells us whether \( f(t) \) is even or odd

PAGE 6

For example,

\[ f(t) = \begin{cases} t & 0 < t < 2 \\ 1 & 2 < t < 3 \end{cases} \quad \text{period is } 6 \]

w/ even extensions

A graph showing the even extension of the function  f(t) . The original function is shown in the first quadrant with a line segment from  (0,0)  to  (2,2)  and a horizontal segment at  y=1  from  t=2  to  t=3 . The even extension reflects this across the y-axis, creating a symmetric pattern. The resulting periodic wave is continuous and symmetric about the vertical axis, which results in a Fourier cosine series.

results in a Fourier cosine series

w/ odd extensions

A graph showing the odd extension of the function  f(t) . The original function in the first quadrant is reflected through the origin into the third quadrant. This creates a point-symmetric pattern where  f(-t) = -f(t) . The resulting periodic wave is antisymmetric about the origin, which results in a Fourier sine series.

results in a Fourier sine series

PAGE 7

Fourier Sine Series Calculation

Let's write out the Fourier sine series for the 2nd graph.

odd: \( a_n = 0 \)

\[ b_n = \frac{2}{3} \int_{0}^{3} f(t) \sin\left(\frac{n \pi t}{3}\right) dt \]\[ = \dots = \frac{6 \sin\left(\frac{2n\pi}{3}\right) - 4n\pi \cos\left(\frac{2n\pi}{3}\right)}{n^2 \pi^2} + \frac{2 \cos\left(\frac{2n\pi}{3}\right) - 2 \cos(n\pi)}{n\pi} \]

First few terms of the series

\[ f(t) \sim \left( \frac{3\sqrt{3}}{\pi^2} + \frac{3}{\pi} \right) \sin\left(\frac{\pi t}{3}\right) + \left( \frac{-3\sqrt{3}}{4\pi^2} - \frac{1}{\pi} \right) \sin\left(\frac{2\pi t}{3}\right) + \dots \]

Another Example: Even Extension

another example: \( f(t) = \sin(t) \) for \( 0 < t < \pi \), period \( 2\pi \) w/ even extensions.

Cosine series

A graph of a periodic function f(t) = |sin(t)|. The horizontal t-axis shows labels for -pi and pi. The vertical f(t) axis is centered. The function consists of a series of positive half-sine waves (arches) above the t-axis, alternating in red and green colors, representing the even extension of a sine wave.
Graph of the even extension of \( f(t) = \sin(t) \) resulting in a cosine series.
PAGE 8

Fourier Series Approximation of Piecewise Odd Extension (Period=6)

The following graph illustrates the Fourier series approximation of a periodic function with a period of \( T = 6 \). The function is a piecewise odd extension, and the plot demonstrates how increasing the number of terms \( N \) in the Fourier series improves the approximation of the true periodic function.

A graph showing the Fourier series approximation of a piecewise odd periodic function with period 6. The x-axis represents time t from -6 to 6, and the y-axis represents f(t) from -2 to 2. The true periodic function is shown as a dashed gray line, consisting of linear segments and horizontal steps. Four approximations are shown: N=1 (a simple sine wave), N=5, N=20, and N=100. As N increases, the approximation becomes more accurate, though high-frequency oscillations (Gibbs phenomenon) are visible near the discontinuities for N=100.
Figure 1: Fourier series approximations for \( N = 1, 5, 20, \) and \( 100 \) terms.

Key Observations:

  • Convergence: As the number of terms \( N \) increases, the Fourier series converges toward the true periodic function.
  • Gibbs Phenomenon: Notice the persistent overshoots and oscillations near the points of discontinuity (e.g., at \( t = \pm 2 \) and \( t = \pm 3 \)), which are characteristic of Fourier series approximations of discontinuous functions.
  • Odd Symmetry: The function and its approximations exhibit odd symmetry, meaning \( f(t) = -f(-t) \), which implies the Fourier series consists only of sine terms.
PAGE 9

Fourier Series Coefficients Calculation

The Fourier coefficients for the function are calculated as follows:

\[ b_n = 0 \]
\[ a_0 = \frac{2}{\pi} \int_{0}^{\pi} f(t) \, dt = \frac{4}{\pi} \]
\[ a_n = \frac{2}{\pi} \int_{0}^{\pi} \sin(t) \cos(nt) \, dt \]
\[ \dots = \frac{2[1 + (-1)^n]}{\pi(1 - n^2)} = \begin{cases} 0 & \text{if } n \text{ is odd} \\ \frac{4}{\pi(1 - n^2)} & \text{if } n \text{ is even} \end{cases} \]

Fourier Series Expansion

The resulting Fourier series approximation for \( f(t) \) is:

\[ f(t) \sim \frac{2}{\pi} - \frac{4}{3\pi} \cos(2t) - \frac{4}{15\pi} \cos(4t) - \dots \]
PAGE 10

Fourier Series: Even Extension of \(\sin(t)\)

Period = \(2\pi\)

A graph showing the Fourier series approximations of the even extension of the sine function, |\sin(t)|. The x-axis represents time t from -2\pi to 2\pi, and the y-axis represents f(t) from 0.0 to 1.0. A dashed gray line shows the target function |\sin(t)|, which consists of periodic positive half-sine waves. Several colored curves represent the Fourier series partial sums for different values of N: a horizontal orange line for N=0, and increasingly accurate oscillating curves for N=1 (orange), N=2 (green), and N=5 (red), which closely follows the target function except at the sharp cusps at multiples of \pi.
Figure 1: Visualization of the Fourier series convergence for the even extension \(f(t) = |\sin(t)|\).

Legend and Parameters

  • Even Extension \(|\sin(t)|\)
  • \(N = 0\)
  • \(N = 1\)
  • \(N = 2\)
  • \(N = 5\)

The graph illustrates how the Fourier series partial sums approximate the absolute value of the sine function. As the number of terms \(N\) increases, the approximation becomes more accurate, particularly in the smooth regions of the curve. Note the behavior near the points \(t = n\pi\), where the function has non-differentiable cusps.